<%--
  Created by IntelliJ IDEA.
  User: Yang
  Date: 2021/11/27
  Time: 8:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <%@include file="common/devhead.jsp"%>>
</head>
<body style="background-color:white" class="nav-md">
<div class="container body">
    <div style="padding-right: 15px;
    padding-left: 259px;
    margin-right: auto;
    margin-left: auto;">
    <div class="row">
    <h2>手游基础信息 <i class="fa fa-user"></i><small>${devUserSession.devName}</small></h2>
    <div class="x_title">
        <div class="x_panel">
        <div class="clearfix"></div>
            <div class="x_content">
                <div class="form-horizontal form-label-left">
                    <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="softwareName">手游名称 <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                            <input type="hidden" value="${appView.id}" name="id">
                            <input  class="form-control col-md-7 col-xs-12" readonly="readonly" data-validate-length-range="6" data-validate-words="2" id="softwareName" name="softwareName" placeholder="请输入手游名称" required="required" type="text" value="${appView.softwareName}">
                        </div>
                    </div>
                    <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="APKName">APK名称 <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                            <input id="APKName" value="${appView.APKName}" readonly="readonly" class="form-control col-md-7 col-xs-12" data-validate-length-range="6" data-validate-words="2" name="APKName" placeholder="请输入APK名称" required="required" readonly="readonly" type="text">
                            <span class="apknameExist"></span>
                        </div>
                    </div>
                    <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" >支持ROM <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                            <input  value="${appView.supportROM}" readonly="readonly" class="form-control col-md-7 col-xs-12" data-validate-length-range="6" data-validate-words="2" name="supportROM" placeholder="请输入ROM" required="required" type="text">
                        </div>
                    </div>
                    <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="interfaceLanguage">界面语言 <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                            <input id="interfaceLanguage" readonly="readonly" value="${appView.interfaceLanguage}" class="form-control col-md-7 col-xs-12" data-validate-length-range="6" data-validate-words="2" name="interfaceLanguage" placeholder="请输入手游支持的界面语言" required="required" type="text">
                        </div>
                    </div>
                    <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="softwareSize">手游大小 <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                            <input id="softwareSize" readonly="readonly" value="${appView.softwareSize}" class="form-control col-md-7 col-xs-12" data-validate-length-range="6" data-validate-words="2" name="softwareSize" placeholder="请输入手游大小、单位为Mb" required="required" type="text">
                        </div>
                    </div>
                    <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="downloads">下载次数 <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                            <input id="downloads" readonly="readonly" value="${appView.downloads}" class="form-control col-md-7 col-xs-12" data-validate-length-range="6" data-validate-words="2" name="downloads" placeholder="请输入下载次数" required="required" type="text">
                        </div>
                    </div>
                    <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" >所属平台 <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                            <input id="flatformname" readonly="readonly" value="${appView.flatformname}" class="form-control col-md-7 col-xs-12" data-validate-length-range="6" data-validate-words="2" name="flatformname" placeholder="请输入下载次数" required="required" type="text">
                        </div>
                    </div>
                    <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" >分类 <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                            <input name="categoryLevel3" value="${appView.categoryLevel1Name}>${appView.categoryLevel2Name}>${appView.categoryLevel3Name}" class="form-control col-md-7 col-xs-12" readonly="readonly" data-validate-length-range="6" data-validate-words="2"   required="required" readonly="readonly" type="text">
                        </div>
                    </div>
                    <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" >手游状态 <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                            <input  value="${appView.statusname}" class="form-control col-md-7 col-xs-12" readonly="readonly" data-validate-length-range="6" data-validate-words="2"   required="required" readonly="readonly" type="text">
                        </div>
                    </div>
                    <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="appInfo">应用简介 <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                            <textarea id="appInfo"  class="form-control col-md-7 col-xs-12" readonly="readonly" name="appInfo" required="required" type="text">${appView.appInfo}</textarea>
                        </div>
                    </div>
                    <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12">LOGO图片 <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                                <img  src="${pageContext.request.contextPath}${appView.logoPicPath}" style="width: 100px;height: 80px;">
                        </div>
                    </div>

                </div>
            </div>
    </div>
    </div>
        <div class="row">
            <div class="x_title">
                <h2>历史版本列表</h2>
                <div class="clearfix"></div>
            </div>
            <div class="x_content1">
                <div class="clearfix"></div>
                <p class="text-muted font-13 m-b-30"></p>
                <div id="datatable-responsive_wrapper"
                     class="dataTables_wrapper form-inline dt-bootstrap no-footer">
                    <div class="row">
                        <div class="col-sm-12">
                            <table id="datatable-responsive" class="table table-striped table-bordered dt-responsive nowrap dataTable no-footer dtr-inline collapsed"
                                   cellspacing="0" width="100%" role="grid" aria-describedby="datatable-responsive_info" style="width: 100%;">
                                <thead>
                                <tr role="row">
                                    <th class="sorting_asc" tabindex="0"
                                        aria-controls="datatable-responsive" rowspan="1" colspan="1"
                                        style="width: 70px;" aria-label="First name: activate to sort column descending"
                                        aria-sort="ascending">软件名称</th>
                                    <th class="sorting" tabindex="0"
                                        aria-controls="datatable-responsive" rowspan="1" colspan="1"
                                        style="width: 10px;"
                                        aria-label="Last name: activate to sort column ascending">
                                        版本号</th>
                                    <th class="sorting" tabindex="0"
                                        aria-controls="datatable-responsive" rowspan="1" colspan="1"
                                        style="width: 90px;"
                                        aria-label="Last name: activate to sort column ascending">
                                        版本大小(单位:M)</th>
                                    <th class="sorting" tabindex="0"
                                        aria-controls="datatable-responsive" rowspan="1" colspan="1"
                                        style="width: 50px;"
                                        aria-label="Last name: activate to sort column ascending">
                                        发布状态</th>
                                    <th class="sorting" tabindex="0"
                                        aria-controls="datatable-responsive" rowspan="1" colspan="1"
                                        style="width: 50px;"
                                        aria-label="Last name: activate to sort column ascending">
                                        APK文件下载</th>
                                    <th class="sorting" tabindex="0"
                                        aria-controls="datatable-responsive" rowspan="1" colspan="1"
                                        style="width: 50px;"
                                        aria-label="Last name: activate to sort column ascending">
                                        最新更新时间</th>
                                </tr>
                                </thead>
                                <tbody>
                                <c:forEach var="appVersion" items="${version}" varStatus="status">
                                    <tr role="row" class="odd">

                                        <td tabindex="0" class="sorting_1">${appVersion.softwareName}</td>
                                        <td>${appVersion.versionNo}</td>
                                        <td>${appVersion.versionSize}</td>
                                        <td>${appVersion.pulishStatusName }</td>
                                        <td>
                                            <a href="${appVersion.downloadLink }">${appVersion.apkFileName }</a>
                                        </td>
                                        <td><fm:formatDate value="${appVersion.modifyDate }" pattern="yyyy-MM-dd"/></td>
                                    </tr>
                                </c:forEach>
                                </tbody>
                            </table>
                            <button id="back" class="btn btn-primary">返回</button>
                        </div>
                    </div>
        </div>
    </div>
    </div>
</div>
    </div>
</div>
</body>
<%@include file="common/devfoot.jsp"%>
<script src="${pageContext.request.contextPath}/statics/js/jquery-1.12.4.js"></script>
<script>
    var backBtn=null;
    $(function (){
        backBtn = $("#back");
        backBtn.on("click",function(){
            //alert("view : "+referer);
            if(referer != undefined
                && null != referer
                && "" != referer
                && "null" != referer
                && referer.length > 4){
                window.location.href = referer;
            }else{
                history.back(-1);
            }
        });
    })
</script>
</html>
